home *** CD-ROM | disk | FTP | other *** search
- // multi-language demo
-
- #include <math.h>
-
- double d; double c;
- string inp[80];
- string msg[80]; string diam[80]; string circ[80];
- int lang;
-
- lang = 0;
- if _lang = "English"; lang = 1; endif;
- if _lang = "German"; lang = 2; endif;
-
-
- // set a default language, if the config-language is not supported
- // English in this example:
-
- if lang = 0; lang = 1; endif;
-
-
- // set the message variables:
-
- if lang = 1;
- msg = "RETURN to exit";
- diam = "diameter: ";
- circ = "circumference: ";
- endif;
- if lang = 2;
- msg = "RETURN zum Beenden";
- diam = "Durchmesser: ";
- circ = "Umfang: ";
- endif;
-
- print /n;
- print msg, /n2;
- inp = " ";
- while inp != "";
- input diam inp;
- if inp != "";
- val d inp;
- c = M_PI * d;
- print circ, c, /n2;
- endif;
- wend;
-